////////////////////////////////////////////////////////////////////////////
//
// Copyright 2018 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////

@import "~realm-studio-styles/variables";

.CreateObjectDialog {
  &__PropertyRow {
    &__Label {
      width: 100%;
    }

    &__Badges {
      float: right;
      font-size: 1rem;

      & > * {
        margin-left: $spacer / 4;
      }
    }
  }

  &__ObjectControl {
    &__FormControl {
      align-items: center;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
    }

    &__Display {
      font-size: .8rem;

      &--null {
        color: $elephant;
        font-style: italic;
      }
    }
  }

  &__BooleanControl,
  &__ListControl {
    &__Buttons {
      align-items: center;
      display: flex;
      justify-content: center;

      & > * {
        margin: $spacer / 4;
      }
    }
  }

  &__StringControl,
  &__DateControl,
  &__NummericControl {
    &__Input {
      &::placeholder {
        font-style: italic;
      }
    }
  }

  &__DateControl {
    &__Input {
      // Overriding the bootstrap default as this produces columns
      flex-direction: row !important; // sass-lint:disable-line no-important

      &::-webkit-clear-button { // sass-lint:disable-line no-vendor-prefixes
        -webkit-appearance: none; // sass-lint:disable-line no-vendor-prefixes
        display: none;
      }
    }
  }

  &__ListControl {
    $list-control-gutter: $spacer / 2;
    background: $window-background;
    border: $input-border-width solid $input-border-color;
    border-radius: $input-border-radius;
    padding: $input-padding-y $input-padding-x;

    &__Item {
      display: inline-block;
      padding-bottom: $list-control-gutter;
      width: 100%;
      // Same as the model
      z-index: 1050;
    }
  }
}
